package com.xbongbong.paas.service.workflow.setting;

import com.xbongbong.paas.pojo.workflow.settings.dto.WorkFlowListDTO;
import com.xbongbong.paas.pojo.workflow.settings.dto.WorkflowAddDTO;
import com.xbongbong.paas.pojo.workflow.settings.dto.WorkflowArchiveDTO;
import com.xbongbong.paas.pojo.workflow.settings.dto.WorkflowDeleteDTO;
import com.xbongbong.paas.pojo.workflow.settings.dto.WorkflowDeleteVersionDTO;
import com.xbongbong.paas.pojo.workflow.settings.dto.WorkflowEnableDTO;
import com.xbongbong.paas.pojo.workflow.settings.dto.WorkflowGetDTO;
import com.xbongbong.paas.pojo.workflow.settings.dto.WorkflowGetDetailDTO;
import com.xbongbong.paas.pojo.workflow.settings.dto.WorkflowLinkListDTO;
import com.xbongbong.paas.pojo.workflow.settings.dto.WorkflowNewVersionDTO;
import com.xbongbong.paas.pojo.workflow.settings.dto.WorkflowSortDTO;
import com.xbongbong.paas.pojo.workflow.settings.dto.WorkflowSortListDTO;
import com.xbongbong.paas.pojo.workflow.settings.dto.WorkflowUpdateDTO;
import com.xbongbong.paas.pojo.workflow.settings.dto.WorkflowUpdateNameDTO;
import com.xbongbong.paas.pojo.workflow.settings.dto.WorkflowVersionListDTO;
import com.xbongbong.paas.pojo.workflow.settings.vo.WorkFlowListVO;
import com.xbongbong.paas.pojo.workflow.settings.vo.WorkflowAddVO;
import com.xbongbong.paas.pojo.workflow.settings.vo.WorkflowArchiveVO;
import com.xbongbong.paas.pojo.workflow.settings.vo.WorkflowDeleteVO;
import com.xbongbong.paas.pojo.workflow.settings.vo.WorkflowDeleteVersionVO;
import com.xbongbong.paas.pojo.workflow.settings.vo.WorkflowEnableVO;
import com.xbongbong.paas.pojo.workflow.settings.vo.WorkflowGetDetailVO;
import com.xbongbong.paas.pojo.workflow.settings.vo.WorkflowGetVO;
import com.xbongbong.paas.pojo.workflow.settings.vo.WorkflowLinkListVO;
import com.xbongbong.paas.pojo.workflow.settings.vo.WorkflowNewVersionVO;
import com.xbongbong.paas.pojo.workflow.settings.vo.WorkflowSortListVO;
import com.xbongbong.paas.pojo.workflow.settings.vo.WorkflowSortVO;
import com.xbongbong.paas.pojo.workflow.settings.vo.WorkflowUpdateNameVO;
import com.xbongbong.paas.pojo.workflow.settings.vo.WorkflowUpdateVO;
import com.xbongbong.paas.pojo.workflow.settings.vo.WorkflowVersionListVO;
import com.xbongbong.paas.toolbox.exception.XbbException;

/**
 * @author 吴峰
 * @date 2021/05/10 10:24
 */
public interface WorkflowSetService {

    /**
     * 获取审批列表
     * @param workFlowListDTO
     * @return com.xbongbong.workflow.pojo.settings.vo.WorkFlowListVO
     * @author 吴峰
     * @date 2021/5/10 13:59
     * @throws XbbException
     */
    WorkFlowListVO list(WorkFlowListDTO workFlowListDTO) throws XbbException;

    /**
     * 新建工作流
     * @param workflowAddDTO
     * @return com.xbongbong.workflow.pojo.settings.vo.WorkflowAddVO
     * @author 吴峰
     * @date 2021/5/10 15:19
     * @throws XbbException
     */
    WorkflowAddVO add(WorkflowAddDTO workflowAddDTO) throws XbbException;

    /**
     * 删除工作流
     * @param workflowDeleteDTO
     * @return com.xbongbong.workflow.pojo.settings.vo.WorkflowDeleteVO
     * @author 吴峰
     * @date 2021/5/13 15:08
     * @throws XbbException
     */
    WorkflowDeleteVO delete(WorkflowDeleteDTO workflowDeleteDTO) throws XbbException;


    /**
     * 启用工作流/关闭工作流
     * @param workflowEnableDTO
     * @return com.xbongbong.workflow.pojo.settings.vo.WorkflowDeleteVO
     * @author 吴峰
     * @date 2021/5/13 15:08
     * @throws XbbException
     */
    WorkflowEnableVO enable(WorkflowEnableDTO workflowEnableDTO) throws XbbException;

    /**
     * 返回工作流树
     * @param workflowGetDTO
     * @return
     * @author 吴峰
     * @date 2021/5/13 15:08
     * @throws XbbException
     */
    WorkflowGetVO get(WorkflowGetDTO workflowGetDTO) throws XbbException;

    /**
     * 工作流详情
     * @param workflowGetDetailDTO
     * @return
     * @throws XbbException
     */
    WorkflowGetDetailVO getDetail(WorkflowGetDetailDTO workflowGetDetailDTO) throws XbbException;



    /**
     * 更新工作流名称
     * @param workflowUpdateNameDTO
     * @return
     * @author 吴峰
     * @date 2021/5/24 15:56
     * @throws XbbException
     */
    WorkflowUpdateNameVO updateName(WorkflowUpdateNameDTO workflowUpdateNameDTO) throws XbbException;

    /**
     * 获取该表单的优先级列表
     * @param workflowSortListDTO
     * @return com.xbongbong.workflow.pojo.settings.vo.WorkflowSortListVO
     * @author 吴峰
     * @date 2021/5/25 14:05
     * @throws XbbException
     */
    WorkflowSortListVO sortList(WorkflowSortListDTO workflowSortListDTO) throws XbbException;
    /**
     * 获取该表单的优先级列表
     * @param workflowSortDTO
     * @return com.xbongbong.workflow.pojo.settings.vo.WorkflowSortVO
     * @author 吴峰
     * @date 2021/5/25 14:05
     * @throws XbbException
     */
    WorkflowSortVO sort(WorkflowSortDTO workflowSortDTO) throws XbbException;

    /**
     * 更新工作流属性
     * @param workflowUpdateDTO
     * @return
     * @throws XbbException
     */
    WorkflowUpdateVO update(WorkflowUpdateDTO workflowUpdateDTO) throws XbbException;

    /**
     * 版本列表
     * @param workflowVersionListDTO
     * @return
     * @throws XbbException
     */
    WorkflowVersionListVO versionList(WorkflowVersionListDTO workflowVersionListDTO) throws XbbException;

    /**
     * 归档
     * @param workflowArchiveDTO
     * @return
     * @throws XbbException
     */
    WorkflowArchiveVO archive(WorkflowArchiveDTO workflowArchiveDTO) throws XbbException;

    /**
     * 添加新版本
     * @param workflowNewVersionDTO
     * @return
     * @throws XbbException
     */
    WorkflowNewVersionVO newVersion(WorkflowNewVersionDTO workflowNewVersionDTO) throws XbbException;
    /**
     * 删除新版本
     * @param workflowDeleteVersionDTO
     * @return
     * @throws XbbException
     */
    WorkflowDeleteVersionVO deleteVersion(WorkflowDeleteVersionDTO workflowDeleteVersionDTO) throws XbbException;

    /**
     * 保存下“审批完成后允许编辑”配置
     * @param corpid
     * @param formId
     * @param saasMark
     * @param businessType
     * @param allowEditAfterFinished
     * @throws XbbException
     */
    void saveAllowEditAfterFinished(String corpid, Long formId, Integer saasMark, Integer businessType, Integer allowEditAfterFinished) throws XbbException;

    /**
     * Description: 工作流关联对象列表
     * @param workflowLinkListDTO
     * @return com.xbongbong.workflow.pojo.settings.vo.WorkflowLinkListVO
     * @throws
     * @author 魏荣杰
     * @date 2022/3/25 09:58
     * @since
     */
    WorkflowLinkListVO linkList(WorkflowLinkListDTO workflowLinkListDTO) throws XbbException;

}
